package com.fz.song.myspring.songfazhun;

import com.fz.song.myspring.spring.SongFaZhunApplicationContext;

public class MyApplication {

    public static void main(String[] args) {

        //根据配置类,创建自己的spring容器
        SongFaZhunApplicationContext context = new SongFaZhunApplicationContext(AppConfig.class);

        //从spring容器中获取bean
        UserService userService = (UserService) context.getBean("userService");

        //调用bean的方法
        userService.test();

    }
}
